package com.yboot.module.quartz.model.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yboot.starter.common.core.web.validation.InsertGroup;
import com.yboot.starter.common.core.web.validation.UpdateGroup;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Data;

/**
 * 定时任务调度日志表
 * @author yangcs
 * @date 2025-08-29
 */
@Data
public class SysJobLogDto implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * ID
     */
    @NotBlank(message = "id不能为空", groups = {UpdateGroup.class})
    private String id;
    /**
     * 任务名称
     */
    @NotBlank(message = "jobName不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String jobName;
    /**
     * 任务组名
     */
    @NotBlank(message = "jobGroup不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String jobGroup;
    /**
     * 调用目标字符串
     */
    @NotBlank(message = "invokeTarget不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String invokeTarget;
    /**
     * 日志信息
     */
    private String jobMessage;
    /**
     * 执行状态（0正常 1失败）
     */
    private String status;
    /**
     * 异常信息
     */
    private String exceptionInfo;
    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;
    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime stopTime;
    /**
     * 删除标识
     */
    private String deleteFlag;
}
